@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --color-primary: rgba(245, 245, 245, 1);
    --color-white: #fff;
    --color-red: rgb(255, 63, 63);
    --color-gray-100: hsl(220, 20%, 10%, 5%);
    --color-gray-200: hsl(220, 20%, 10%, 10%);
    --color-gray-300: hsl(220, 20%, 10%, 25%);
    --color-gray-700: #fff;
    --color-gray-900: #0c0c22;

    --color-bg: rgba(245, 245, 245, 1);

    --transition: all 300ms ease;

    --container-width-lg: 84%;
    --container-width-md: 92%;
    --form-width: 50%;

    --radius-1: 0.3rem;
    --radius-2: 0.6rem;
    --radius-3: 1rem;
    --radius-4: 2rem;
}

* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins, sans-serif';
    background: var(--color-bg);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-gray-700)
}

a {
    color: var(--color-gray-700);
    text-decoration: none;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-gray-900);
    line-height: 1.1;
}

h1 {
    font-size: 2.2rem;;
}

h2 {
    font-size: 1.9rem;;
}

h3 {
    font-size: 1.3rem;
    line-height: 1.25;
}

h4 {
    font-size: 1.1rem;
}

h5 {
    line-height: 1.4;
}

img {
    display: block;
    object-fit: cover;
    width: 100%;
}

section {
    margin-top: 5rem;
}

.container {
    width: var(--container-width-lg);
    margin-inline: auto;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    width: fit-content;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-2);
    background: var(--color-white);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn.primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn.category {
    background: var(--color-bg);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 400;
}

.btn.sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    font-weight: 400;
}

.btn.danger {
    background: var(--color-red);
    color: var(--color-white);
}

.btn:hover {
    background: var(--color-gray-900);
    color: var(--color-white);
}

/*NAVBAR*/

nav {
    width: 100vw;
    height: 5rem;
    display: grid;
    place-items: center;
    background: rgba(80, 62, 157, 1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    backdrop-filter: blur(20px);
}

.nav__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%
}

.nav__logo {
    width: 3rem;
    display: block;
    text-decoration: none;
    color: white;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav__menu li a {
    color: rgba(255, 255, 255, 1);
}
.nav__toggle-btn {
    display: none;
}

.content {
    width: 30px;
    height: 46px;
    overflow-wrap: break-word;
    color: rgba(255, 255, 255, 1);
    font-size: 50px;
    font-family: PingFang SC-Medium;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    line-height: 50px;
    margin: 39px 0 0 10px;
}
/*FOOTER*/

footer {
    background: var(--color-gray-900);
    margin-top: 6rem;
    padding-top: 6rem;
}

.footer__categories {
    display: flex;
    text-align: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.footer__categories a {
    background: var(--color-gray-700);
    color: var(--color-white);
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-2);
    transition: var(--transition);
}

.footer__categories a:hover {
    background: var(--color-white);
    color: var(--color-gray-900);
}

.footer__copyright {
    text-align: center;
    border-top: 2px solid var(--color-gray-700);
    padding: 1rem;
    color: var(--color-white);
    font-weight: 300;
}

.center {
    text-align: center;
    padding-top: 5rem;
    margin-inline: center;
    display: block;
    width: 100%;
}

.error-page h2 {
    margin-top: 3rem;
}

/*POSTS*/
.posts__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.footer {
    padding-top: 5px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
}
.post {
    background: var(--color-white);
    padding: 0.5rem;
    border-radius: var(--radius-2);
    padding-bottom: 0.8rem;
    transition: var(--transition);
    cursor: default;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post:hover {
    box-shadow: 0 1.5rem 2rem rgba(0, 0, 0, 0.1);
}
.post__title {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    word-break: break-all;
}
.post__thumbnail {
    border-radius: var(--radius-4);
    overflow: hidden;
    height: 2.5rem;
    width: 2.5rem;
}

.post__content {
    margin-top: 0.1rem;
}

.post__content p {
    margin-left: 1rem;
}

.post__content h3 {
    margin: 1rem 0 0.6rem;
}

.post__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2rem;
}

.post__author {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.post__author-avatar {
    width: 2.5rem;
    aspect-ratio: 1/1;
    border-radius: var(--radius-1);
    overflow: hidden;
}

/*POST DETAILS*/

.post-details {
    width: 100%;
    background: var(--color-white);
    margin-inline: auto;
}

.header {
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
    background-color: rgba(80, 62, 157, 1);
    border-radius: 0px 0px 20px 20px;
    height: 158px;
    padding:20px;
}

.header2 {
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
    background-color: rgba(80, 62, 157, 1);
    border-radius: 0px 0px 20px 20px;
    height: 82px;
    padding:20px;
    margin-top: -30px;
}
.navbar {
    background: var(--color-white);
}
.part {
    padding:0.5rem;
    position: relative;
    top: -55px;
}
.part2 {
    padding:0.5rem;
    position: relative;
}
.part {
    .image-wrapper_1 {
        background-color: rgba(80, 62, 157, 1);
        border-radius: 16px;
        height: 45px;
        width: 45px;
    }
    .image-wrapper_2 {
        background-color: rgba(251, 110, 58, 1);
        border-radius: 16px;
        height: 45px;
        width: 45px;
    }
    .image-wrapper_13 {
        background-color: rgba(251, 205, 92, 1);
        border-radius: 16px;
        height: 45px;
        width: 45px;
    }

    .thumbnail_1 {
        width: 14px;
        height: 16px;
        margin: 15px 0 0 15px;
    }
}

.post-details__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.post-details__buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.post-details__thumbnail {
    margin: 1rem 0;
    height: fit-content;
    max-height: 30rem;
    overflow: hidden;
}

.post-details p {
    margin-bottom: 0.7rem;
    margin: 1rem;
}

/*REGISTER*/

.form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-1);
    resize: none;
}

.form__error-message {
    background: var(--color-red);
    color: var(--color-white);
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-1);
    display: block;
    margin-bottom: 1rem;
}

.register, .login, .create-post {
    margin-inline: auto;
    display: grid;
    place-items: left;
    color: rgba(0, 0, 0, 1);
}

.register h2, .login h2, .create-post h2 {
    margin-bottom: 2rem;
}

.register small, .login small {
    display: block;
    margin-top: 1.5rem;
}

.register small a, .login small a {
    color: var(--color-primary);
}

.register-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(0, 0, 0, 1);
  }

.sign-in-content {
    display: block;
    text-align: center;
    margin: 0 auto;
}

.sign-up {
    text-align: center;
    color: rgba(0, 0, 0, 1);
}

/* custom style for react quill*/

.ql-editor {
    overflow: scroll;
    background: var(--color-white);
    height: 8rem !important
}

/*LOGIN*/

.sign-in {
    text-align: center;
}

.login-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(0, 0, 0, 1);
}

.sign-up-content {
    display: block;
    text-align: center;
    margin: 0 auto;
}

/*AUTHORS*/
.authors {
    padding:0.1rem;
    background-color: var(--color-bg);
}

.authors__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.author {
    display: flex;
    gap: 1rem;
    background: var(--color-white);
    padding: 1rem;
    border-radius: var(--radius-3);
    transition: var(--transition);
}

.author:hover {
    box-shadow: 0 1rem 1.5rem rgba(0, 0, 0, 0.07);
}

.author__avatar {
    width: 5rem;
    aspect-ratio: 1/1;
    border-radius: 50%;
    border: 0.3rem solid var(--color-bg);
    overflow: hidden;
}

.author__info p {
    margin-top: 1rem;
}

/*PROFILE*/

.profile__container {
    display: grid;
    place-items: center;
    text-align: center;
}

.profile__details {
    width: 100%;
}

.avatar__wrapper {
    width: 15rem;
    aspect-ratio: 1/1;
    position: relative;
    margin-inline: auto;
    margin-top: 1rem;
}

.profile__avatar {
    height: 100%;
    border-radius: 50%;
    border: 1rem solid var(--color-white);
    overflow: hidden;
}

.avatar__form {
}

.avatar__form input {
    visibility: hidden;
}

.avatar__form label, .profile__avatar-btn {
    background: var(--color-gray-900);
    color: var(--color-white);
    font-size: 1.2rem;
    position: absolute;
    right: 2rem;
    bottom: 1.4rem;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.profile__avatar-btn {
    cursor: pointer;
    padding: 0;
    background: var(--color-primary);
}

.profile__details h1 {
    margin-top: 1.5rem;
}

.form.profile__form {
    margin-top: 3rem;
    margin-inline: auto;
    width: var(--form-width);
}

.form.profile__form {
    align-items: center;
}

/*DASHBOARD*/

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard__post {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--color-white);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-3);
    margin-bottom: 1rem;
}

.dashboard__post-info {
    display: flex;
    gap: 2rem;
    width: 100%;
    align-items: center;
}

.dashboard__post-thumbnail {
    width: 4rem;
    border-radius: var(--radius-1);
    overflow: hidden;
}

.dashboard__post-actions {
    display: flex;
    gap: 1rem;
}

/*SPINNER*/

.spinner {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    display: grid;
    place-items: center;
    background: var(--color-bg);
}

.spinner__image {
    width: 4.5rem;
    aspect-ratio: 1/1;

}

/*CREATE*/

.create-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

.create-post h2 {
    text-align: center;
}

/*MEDIA QUERIES*/

@media screen and (max-width: 800px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.35rem;
    }

    .container {
        width: var(--container-width-md);
    }

    /*NAVBAR*/

    .nav__container {
        position: relative;
    }

    .nav__menu {
        position: absolute;
        top: 5rem;
        right: 0;
        flex-direction: column;
        gap: 0;
    }

    .nav__menu li {
        width: 100%;
        box-shadow: -2rem 4rem 4rem rgba(0, 0, 0, 0.26);
    }

    .nav__menu li a {
        display: block;
        background: var(--color-white);
        padding: 0.85rem 2.5rem;
        color: rgba(80, 62, 157, 1);
    }

    .nav__toggle-btn {
        display: inline-block;
        background: transparent;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .posts__container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer__categories {
        flex-direction: column;
    }

    .post-details {
        width: 100%;
        background: transparent;
        padding: 0;


        .group_5 {
            box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.12);
            background-color: rgba(80, 62, 157, 1);
            border-radius: 0px 0px 20px 20px;
            position: relative;
            height: 182px;
            margin: 6px 0 95px 0;
        }

        .section_1 {
            background-color: rgba(80, 62, 157, 1);
            width: 375px;
            height: 44px;
        }

        .label_1 {
            width: 24px;
            height: 24px;
            margin: 10px 0 0 7px;
        }

    }

    .register, .login, .create-post {
        width: 100%;
        color: rgba(0, 0, 0, 1);
    }

    .form.profile__form {
        margin-top: 2.5rem;
        width: 100%;
    }

    .authors__container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .dashboard__post {
        margin-bottom: 1rem;
        flex-direction: column;
    }

    .dashboard__post-info {
        gap: 1.5rem;
    }

    .dashboard__post-thumbnail {
        width: 5rem;
    }
 }